using System;
using System.Data;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;

using CentralOffice.Enterprise.Data;
using CentralOffice.Enterprise.BusinessActions;

using NoticeReplyTable = CentralOffice.Enterprise.Data.NoticeReplyDataSet.NoticeReplyDataTable;
using NoticeReplyRow = CentralOffice.Enterprise.Data.NoticeReplyDataSet.NoticeReplyRow;

namespace CentralOffice.WebClient.Enterprises
{
    /// <summary>
    /// Summary description for $codebehindclassname$
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class EnterpriseNoticeHandler : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            //context.Response.ContentType = "text/plain";
            //context.Response.Write("Hello World");

            if (context.Request.Form["op"] == "delete")
            {
                NoticeReply.DeleteById(new Guid(context.Request.Form["id"]));
                context.Response.ContentType = "text/plain";
                context.Response.Write("Success");
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}
